import { defineConfig } from 'vite'

export default defineConfig({
  build: {
    lib: {
      entry: './index.js',
      name: 'network',
      fileName: format => `network.${format}.js`
    },
    rollupOptions: {
      external: ['@fingerprintjs/fingerprintjs', 'axios', 'js-cookie', 'query-string'],
      output: {
        exports: 'named',
        globals: {
          '@fingerprintjs/fingerprintjs': 'Fingerprint2',
          'axios': 'axios',
          'js-cookie': 'Cookies',
          'query-string': 'qs'
        }
      }
    }
  }
})
